import { HashRouter as Router, Route, Switch } from 'react-router-dom'
import App from './pages/app'
import Login from './pages/login'
import Home from './pages/home'
import Detail from './pages/detail'
import Welcome from './pages/welcome'
import Clock from './pages/clock'
import NotFound from './pages/404'

export default function IRouter() {
  return (
    <Router>
      <Switch>
        <Route exact path="/" component={App}></Route>
        <Route path="/login" component={Login}></Route>
        <Route path="/home" component={Home}></Route>
        <Route path="/detail/:id" component={Detail}></Route>
        <Route path="/welcome" component={Welcome}></Route>
        <Route path="/clock" component={Clock}></Route>
        <Route path="*" component={NotFound}></Route>
      </Switch>
    </Router>
  )
}
